var permissions = require("../../../public/config/permissions.json");
var _base = require("../base/_base");

module.exports = {
    post: function(req, res) {
        var busname = req.params.busname;
        var complex_obj = permissions[busname];

        var needtables = Object.keys(complex_obj.insert);

        needtables.forEach(function(tablename) {
            req.tablename = tablename;
            _base.post(req, res);
        });
        res.send();
    }
}
console.log(Object.keys(permissions.achievement.insert));
